/*
 *	This file is part of Lounge-Cast.
 *
 *  Author:  	Markus Moormann
 *	E-mail:  	mmoorman@uni-osnabrueck.de
 *	Copyright:	University of Osnabrueck (Zentrum Virtuos)
 * 	Website:	www.uni-osnabrueck.de
 *	Date:		16.02.2011
 *
 *	Lounge-Cast is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *	Lounge-Cast is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Lounge-Cast.  If not, see <http://www.gnu.org/licenses/>.
 */
package webservice.vo;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * class for representing a TextVO
 * can contain just text, text with an image or
 * text with a video
 *
 * @author Markus Moormann
 */
@XmlRootElement(name = "Text")
public class Text extends Media{

	/**
	 * the id of the media;
	 */
	@XmlElement(name = "mediaId")
	public String media_id;
	
	/**
	 * text without HTML tags
	 */
	@XmlElement(name = "text")
	public String text;
	
	/**
	 * text with HTML tags
	 */
	@XmlElement(name = "formatedText")
	public String formated_text;
	
	/**
	 * background color for player
	 */
	@XmlElement(name = "background_color")
	public int background_color;
	
	/**
	 * skin for later development containing further styling
	 */
	@XmlElement(name = "skin")
	public String skin;
	
	/**
	 * a video belonging to the text
	 */
	@XmlElement(name = "video")
	public String video;
	
	/**
	 * aspect ratio of the video
	 */
	@XmlElement(name = "video_aspect_ratio")
	public String video_aspect_ratio;
	
	/**
	 * an image belonging to the text
	 */
	@XmlElement(name = "image")
	public String image;
	
	/**
	 * the person holding the rights of the image
	 */
	@XmlElement(name = "image_source")
	public String image_source;
	
	/**
	 * the orientation of the image ('left'|'right'|'top'|'bottom')
	 */
	@XmlElement(name = "image_orientation")
	public String image_orientation;
	
	/**
	 * width of the image
	 */
	@XmlElement(name = "image_width")
	public int image_width;
	
	/**
	 * height of the image
	 */
	@XmlElement(name = "image_height")
	public int image_height;
	
	/**
	 * aspect ratio of the image 
	 */
	@XmlElement(name = "image_aspect_ratio")
	public float image_aspect_ratio;
	
	@XmlElement(name = "background_image")
	public String background_image;
	
	/**
	 * margin from bottom;
	 */
	@XmlElement(name = "margin_bottom")
	public int margin_bottom;
	/**
	 * margin from left
	 */
	@XmlElement(name = "margin_left")
	public int margin_left;
	/**
	 * margin from top
	 */
	@XmlElement(name = "margin_top")
	public int margin_top;
	/**
	 * margin from right
	 */
	@XmlElement(name = "margin_right")
	public int margin_right;
	
	@XmlElement(name= "publish_date")
	public String publish_date;
	
	/**
	 * default constructor
	 */
	public Text() {}

	/**
	 * constructor for text object
	 * 
	 * @param media a <code>MediaVO</code> containing all common information
	 * @param text the text of the media without HTML-Tags
	 * @param formated_text the text of the media with HTML-Tags
	 * @param background_color the chosen background-color
	 * @param skin an URL pointing to SWF for further design(not implemented yet)
	 * @param video the URL pointing to the video
	 * @param video_aspect_ratio the aspect ratio of the video ('16:9'|'4:3')
	 * @param image the URL pointing to the image
	 * @param image_source the person who holds the rights of the image
	 * @param image_orientation the orientation of the image ('left'|'right'|'top'|'bottom')
	 * @param image_width width of the image
	 * @param image_height height of the image
	 * @param image_aspect_ratio the aspect ratio of the image
	 * @param background_image the background_image to show
	 * @param margin_bottom margin from bottom
	 * @param margin_left margin from left
	 * @param margin_top margin from top
	 * @param margin_right margin from right
	 */
	public Text(Media media, 
				String text, 
				String formated_text,
				int background_color,
				String skin, 
				String video,
				String video_aspect_ratio,
				String image, 
				String image_source,
				String image_orientation,
				int image_width,
				int image_height,
				float image_aspect_ratio,
				String background_image,
				int margin_bottom,
				int margin_left,
				int margin_top,
				int margin_right) {
		super();
		this.media_id = media.media_id;
		this.type = media.type;
		this.title = media.title;
		this.valid_date = media.valid_date;
		this.newsticker = media.newsticker;
		this.duration = media.duration;
		this.reference = media.reference;
		this.hide_title = media.hide_title;
		this.title_color = media.title_color;
		
		this.text = text;
		this.formated_text = formated_text;
		this.background_color = background_color;
		this.skin = skin;
		this.video = video;
		this.video_aspect_ratio = video_aspect_ratio;
		this.image = image;
		this.image_source = image_source;
		this.image_orientation = image_orientation;
		this.image_width = image_width;
		this.image_height = image_height;
		this.image_aspect_ratio = image_aspect_ratio;
		this.background_image = background_image;
		this.margin_bottom = margin_bottom;
		this.margin_left = margin_left;
		this.margin_top = margin_top;
		this.margin_right = margin_right;
	}
}
